<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>纯净水世界管理后台</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href='/layui/css/layui.css'>
	<link rel="stylesheet" href='/stylesheets/management.css'>
	<style>
		table thead tr th:first-child {
			width: 10% !important;
		}
	</style>
</head>

<body>
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo layui-hide-xs layui-bg-black">纯净水世界</div>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item layui-hide layui-show-sm-inline-block">
					<a href="javascript:;">
						<img src="//unpkg.com/outeres@0.0.10/img/layui/icon-v2.png" class="layui-nav-img">
						<% if (_adminname=='-null' ){ %>
							登录
							<% }else{ %>
								<%=_adminname %>
									<% } %>
					</a>
					<dl class="layui-nav-child">
						<dd><a href="/management/myinfo">个人资料</a></dd>
						<dd><a href="/management/loginOut">退出登录</a></dd>
					</dl>
				</li>
				<li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
					<a href="javascript:;">
						<i class="layui-icon layui-icon-more-vertical"></i>
					</a>
				</li>
			</ul>
		</div>
		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree" lay-filter="test">
					<li class="layui-nav-item layui-nav-itemed">
						<a class="" href="javascript:;">信息管理模块</a>
						<dl class="layui-nav-child">
							<dd><a href="/management/school">高校信息管理</a></dd>
							<dd><a href="/management/area">园区信息管理</a></dd>
							<dd><a href="/management/build">楼栋信息管理</a></dd>
							<dd><a href="/management/room">宿舍信息管理</a></dd>
							<dd><a href="/management/student"
									style="background-color: #16baaa; color: rgb(255, 255 ,255);">学生信息管理</a></dd>
							<dd><a href="/management/order">订单信息管理</a></dd>
							<dd><a href="/management/commodity">商品信息管理</a></dd>
						</dl>
					</li>
					<li class="layui-nav-item">
						<a href="javascript:;">个人中心</a>
						<dl class="layui-nav-child">
							<dd><a href="/management/myinfo">个人信息</a></dd>
							<dd><a href="/management/changepwd">修改密码</a></dd>
						</dl>
					</li>
					<li class="layui-nav-item"><a href="/management/loginOut">退出登录</a></li>
				</ul>
			</div>
		</div>
		<div class="layui-body">
			<!-- 内容主体区域 -->
			<div style="padding: 15px;">
				<div class="layui-elem-quote layui-text">
					<!-- 搜索、查询、添加 -->
					<form action="/management/student/main" method="get">
						<div
							style="display: flex;flex-direction: row;flex-wrap: nowrap;justify-content: flex-start;align-items: center;">
							搜索：
							<input type="text" name="select" placeholder="学生信息搜索" class="layui-input"
								style="width: 20%;margin-right: 16px;" value="" />
							<input type="submit" class="layui-btn layui-btn-primary layui-btn-xs" value="查询" />
							<a href="/management/student/insert" class="layui-btn layui-btn-primary layui-btn-xs">添加</a>
						</div>
					</form>
				</div>
				<div class="layui-card layui-panel">
					<div class="layui-card-header">
					</div>
					<div class="layui-card-body">
						<table class="layui-table" lay-even>
							<colgroup>
								<col width="150">
								<col width="150">
								<col>
							</colgroup>
							<thead>
								<tr>
									<th>学生ID</th>
									<th>姓名</th>
									<th>性别</th>
									<th>学号</th>
									<th>密码</th>
									<th>班级</th>
									<th>学校ID</th>
									<th>宿舍园区ID</th>
									<th>楼栋ID</th>
									<th>宿舍ID</th>
									<th>操作</th>
								</tr>
							</thead>
							<tbody>
								<% DB.forEach (function (item, iindex) { %>
									<tr>
										<td>
											<%= item.StuID %>
										</td>
										<td>
											<%= item.StuName %>
										</td>
										<td>
											<%= item.gender %>
										</td>
										<td>
											<%= item.StuNum %>
										</td>
										<td>
											<%= item.PassWord %>
										</td>
										<td>
											<%= item.ClassName %>
										</td>
										<td>
											<%= item.SchoolID %>
										</td>
										<td>
											<%= item.Dorm_AreaID %>
										</td>
										<td>
											<%= item.Dorm_BuildID %>
										</td>
										<td>
											<%= item.Dorm_RoomID %>
										</td>
										<td>
											<a href="/management/student/delete?delete=<%= item.StuID %>"
												class="caozuo">删除</a>
										</td>
									</tr>
									<% }); %>
							</tbody>
						</table>
					</div>
				</div>
				<% if (ck_two_sql=='0' ) { }else{ %>
					<div id="Choose">
						<table>
							<tr>
								<td></td>
								<td>
									<a href="./" ID="LinkButton1" Style="position: fixed; right: 20px; cursor: pointer;padding: 10px;
                                        background-color: ghostwhite;border-radius: 8px;"> X </a>
								</td>
							</tr>
							<form action="/management/student/insert/main" method="post">
								<tr>
									<td colspan="2" style="text-align: center;">
										<h1 style="display: inline-block;">
											添加
										</h1>
									</td>
								</tr>
								<tbody>
									<tr>
										<td>
											<span>学生姓名：</span>
										</td>
										<td style="width: 100px;">
											<div class="linedate">
												<input type="text" name="StuName" placeholder="学生姓名" value="">
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<span>性别：</span>
										</td>
										<td style="width: 100px;">
											<div class="linedate">
												<input type="text" name="gender" placeholder="性别" value="">
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<span>学号：</span>
										</td>
										<td style="width: 100px;">
											<div class="linedate">
												<input type="text" name="StuNum" placeholder="学号" value="">
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<span>密码：</span>
										</td>
										<td style="width: 100px;">
											<div class="linedate">
												<input type="text" name="PassWord" placeholder="密码" value="">
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<span>班级：</span>
										</td>
										<td style="width: 100px;">
											<div class="linedate">
												<input type="text" name="ClassName" placeholder="班级" value="">
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<span>学校ID：</span>
										</td>
										<td style="width: 100px;">
											<div class="linedate">
												<input type="text" name="SchoolID" placeholder="学校ID" value="">
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<span>宿舍园区ID：</span>
										</td>
										<td style="width: 100px;">
											<div class="linedate">
												<input type="text" name="Dorm_AreaID" placeholder="宿舍园区ID" value="">
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<span>楼栋ID：</span>
										</td>
										<td style="width: 100px;">
											<div class="linedate">
												<input type="text" name="Dorm_BuildID" placeholder="楼栋ID" value="">
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<span>宿舍ID：</span>
										</td>
										<td style="width: 100px;">
											<div class="linedate">
												<input type="text" name="Dorm_RoomID" placeholder="宿舍ID" value="">
											</div>
										</td>
									</tr>
								</tbody>
								<tr style="text-align: center;">
									<td style="width: 100px;">
										<input type="submit" class="layui-btn layui-btn-xs" value="确定" />
									</td>
								</tr>
							</form>
						</table>
					</div>

					<% }; %>
						<br><br>
			</div>
		</div>
		<div class="layui-footer">
			<!-- 底部固定区域 -->
			底部固定区域
		</div>
	</div>

	<script src="/layui/layui.js"></script>
	<script>
		//JS 
		layui.use(['element', 'layer', 'util'], function () {
			var element = layui.element;
			var layer = layui.layer;
			var util = layui.util;
			var $ = layui.$;

			//头部事件
			util.event('lay-header-event', {
				menuLeft: function (othis) { // 左侧菜单事件
					layer.msg('展开左侧菜单的操作', {
						icon: 0
					});
				},
				menuRight: function () { // 右侧菜单事件
					layer.open({
						type: 1,
						title: '更多',
						content: '<div style="padding: 15px;">处理右侧面板的操作</div>',
						area: ['260px', '100%'],
						offset: 'rt', // 右上角
						anim: 'slideLeft', // 从右侧抽屉滑出
						shadeClose: true,
						scrollbar: false
					});
				}
			});
		});
	</script>
</body>